-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[match][sigh] add support for Apple Silicon Macs in iOS/iPadOS provisioning profiles #20676
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this PR @PinkidG ! 💪
Could you update the related specs? e.g. sigh/spec/runner_spec.rb
and match/spec/runner_spec.rb
(not sure if there are others) 🙏
Update match ENV name Co-authored-by: Roger Oba <rogerluan.oba@gmail.com>
@rogerluan Thanks for reviewing it! I added changes to the related specs, though I'm not sure if the |
sigh/spec/runner_spec.rb
Outdated
it "devices for development with apple silicon" do | ||
options = { development: true, include_mac_in_profiles: true } | ||
Sigh.config = FastlaneCore::Configuration.create(Sigh::Options.available_options, options) | ||
|
||
ios_device = "ios_device" | ||
allow(ios_device).to receive(:id).and_return(1) | ||
allow(ios_device).to receive(:device_class).and_return(Spaceship::ConnectAPI::Device::DeviceClass::IPHONE) | ||
as_device = "as_device" | ||
allow(as_device).to receive(:id).and_return(2) | ||
allow(as_device).to receive(:device_class).and_return(Spaceship::ConnectAPI::Device::DeviceClass::APPLE_SILICON_MAC) | ||
|
||
expect(Spaceship::ConnectAPI::Device).to receive(:all).and_return([ios_device, as_device]) | ||
|
||
devices = fake_runner.devices_to_use | ||
expect(devices.size).to eq(2) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works but I kinda have the feeling you're allow
ing too many statements here 😬 not sure if this really attests the functionality you implemented, what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ping @PinkidG , WDYT? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @rogerluan Thanks for the feedback, I'm sorry I didn't get back to it. I'm not really a ruby expert tbh. 😅
I'll try to improve it 🙂
Ahoy, bump for this PR. it's a must have feature ! thanks !! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this, @PinkidG ! 🤗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! I added one commit with a comment about the device class not being officially available in ASC API yet but other than that this is 🔥
Hi @PinkidG. Thanks for putting this PR together. Question for you (or anyone else knowledgeable). I couldn't get my AS macs registered by using this PR, and feel like I'm missing some information or misunderstanding a key part. From the PR Testing Steps:
Looking through the
When adding a new device with the Apple developer portal, you can choose the The fastlane tools register_devices and register_device both don't allow you to specify Do I need to use Apple's Rest API? Am I off track here? Overlooking something? Thx for reading. |
Hi @zakkhoyt 🙂 I can't speak for the Apple introduced a small change with AS Mac devices. They have two IDs that you can register: the If you register the Of course you can register both IDs, even though they are both for the platform Hope that helps a bit! |
Congratulations! 🎉 This was released as part of fastlane 2.211.0 🚀 |
He @PinkidG, thanks for PR, but I have same problem as described by @zakkhoyt I found that if you register your device as a But if you register your mac Fastlane params:
|
@ArtFeel, @PinkidG, @zakkhoyt, there's apparently a bug, or at least inconsistency in the App Store Connect API as of this comment. When I query the App Store Connect API while using an API key, it returns I've worked around this in a custom action I use for adding devices to profiles by checking the length of the UDID:
Where:
Try using a username/password with Fastlane vs API key and see if that makes a difference in behavior for you. |
Checklist
bundle exec rspec
from the root directory to see all new and existing tests passbundle exec rubocop -a
to ensure the code style is validci/circleci
builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)Motivation and Context
Resolves #18581
Macs with Apple Silicon (AS) are capable of running native iOS/iPadOS apps. During development this only works if the Mac is added to the provisioning profile (
development
orad-hoc
).Description
This PR introduces a new device-class (
APPLE_SILICON_MAC
) that is used for iOS/iPadOS provisioning profiles to include AS Mac hardware. Including these devices is required to natively run apps on AS during development or using an ad-hoc signing.To include AS Macs, a new parameter has been added to match (and sigh):
include_mac_in_profiles
. Default isfalse
. If enabled the provisioning profile device count and newly generated profiles will include registered AS Macs.If no AS Mac is registered in the Developer Portal, this setting won't have any effect. If run again without the
include_mac_in_profiles
flag, it will regenerate the provisioning profile without the AS Macs. (So it makes sense to include this setting in theMatchfile
to keep it consistent)Testing Steps
fastlane match development --include_mac_in_profiles
fastlane match
withoutinclude_mac_in_profiles
set, will regenerate the profile without the AS Macs.